package com.nstar.model.orderexpress;

import java.io.Serializable;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="area"
 *     
*/
public class Area implements Serializable {

    /** identifier field */
    private String areaId;

    /** nullable persistent field */
    private String levelId;

    /** nullable persistent field */
    private String name;

    /** nullable persistent field */
    private String zipCode;

    /** persistent field */
    private com.nstar.model.orderexpress.Area area;

    /** persistent field */
    private Set restInfos;

    /** persistent field */
    private Set userInfos;

    /** persistent field */
    private Set orderInfos;

    /** persistent field */
    private Set areas;

    /** full constructor */
    public Area(String areaId, String levelId, String name, String zipCode, com.nstar.model.orderexpress.Area area, Set restInfos, Set userInfos, Set orderInfos, Set areas) {
        this.areaId = areaId;
        this.levelId = levelId;
        this.name = name;
        this.zipCode = zipCode;
        this.area = area;
        this.restInfos = restInfos;
        this.userInfos = userInfos;
        this.orderInfos = orderInfos;
        this.areas = areas;
    }

    /** default constructor */
    public Area() {
    }

    /** minimal constructor */
    public Area(String areaId, com.nstar.model.orderexpress.Area area, Set restInfos, Set userInfos, Set orderInfos, Set areas) {
        this.areaId = areaId;
        this.area = area;
        this.restInfos = restInfos;
        this.userInfos = userInfos;
        this.orderInfos = orderInfos;
        this.areas = areas;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="AREA_ID"
     *         
     */
    public String getAreaId() {
        return this.areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    /** 
     *            @hibernate.property
     *             column="LEVEL_ID"
     *             length="1"
     *         
     */
    public String getLevelId() {
        return this.levelId;
    }

    public void setLevelId(String levelId) {
        this.levelId = levelId;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="50"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="ZIP_CODE"
     *             length="6"
     *         
     */
    public String getZipCode() {
        return this.zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    /** 
     *            @hibernate.many-to-one
     *             not-null="true"
     *            @hibernate.column name="PARENT_AREA_ID"         
     *         
     */
    public com.nstar.model.orderexpress.Area getArea() {
        return this.area;
    }

    public void setArea(com.nstar.model.orderexpress.Area area) {
        this.area = area;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="AREA_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.nstar.model.orderexpress.RestInfo"
     *         
     */
    public Set getRestInfos() {
        return this.restInfos;
    }

    public void setRestInfos(Set restInfos) {
        this.restInfos = restInfos;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="AREA_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.nstar.model.orderexpress.UserInfo"
     *         
     */
    public Set getUserInfos() {
        return this.userInfos;
    }

    public void setUserInfos(Set userInfos) {
        this.userInfos = userInfos;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="AREA_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.nstar.model.orderexpress.OrderInfo"
     *         
     */
    public Set getOrderInfos() {
        return this.orderInfos;
    }

    public void setOrderInfos(Set orderInfos) {
        this.orderInfos = orderInfos;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="PARENT_AREA_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.nstar.model.orderexpress.Area"
     *         
     */
    public Set getAreas() {
        return this.areas;
    }

    public void setAreas(Set areas) {
        this.areas = areas;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("areaId", getAreaId())
            .toString();
    }

}
